<extend name="Public/base" />
<block name="content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="{:U('Index/index')}" data-original-title="首页"><i class="icon-home"></i> 首页</a>
			<a class="tip-bottom" href="{:U('activitySet?activity_id='.I('activity_id'))}" data-original-title="">{$meta_title_c}</a> 
			<a class="current" href="{$post_url}">{$meta_title}</a>
		</div>
	</div>
    <div class="container-fluid" style="margin-top:15px;">

        <!-- 活动信息 -->
        <div class="row-fluid">
            <div class="well well-small">
                <h4 class="muted">{$meta_title}</h4>
            </div>

            <form method="post">   
            	<input type="hidden" name="activity_id" id="activity_id" value="{$activity_id}"/>
                <input type="text" class="datepicker pull-left" placeholder="请输入时间" name="departure_time">
                <button class="btn btn-primary btn-small pull-left" type="submit" style="margin:2px;">
                <i class="icon-ok"></i> 添加
                </button>
            </form>
	    </div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
    $(".datepicker").datetimepicker({
        format: 'yyyy-mm-dd hh:ii', 
        autoclose: true,
        todayBtn: true
    });
    
	//初始化登录用户名输入焦点
	$("form").submit(function(){
		//锁定登录按钮
		$('button').attr('disabled',true);
		var self = $(this);
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		
		/**
		 * @todo 接收登录返回值
		 * @author PHP@妖孽 <dino_ma@163.com>
		 */
		function call_back(data){
			if(data.status==1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
				  if (data.url) {
						location.href=data.url;
					}else{
						location.reload();
					}
				},1500);
			} else {
				$('button').attr('disabled',false);
				tke_alert(data.info,'alert-error');
			}
		}
	});
	//导航高亮
	highlight_subnav("{:U('ServiceManage/index')}");
});
</script>
</block>